Added timestamping feature, edited minor things on file writing