Since you have placed Subroutine Timestamp and Function Wtime inside a module in file stats.f90, you should terminate their END statements with " Subroutine" and " Function", respectively.
I have run the program and reported the results in your previous thread .