Working, saving to correct array and writing to file
Removed some debugging lines and written new file IO subroutine
Better x_t initialiser
Written file IO subroutine
Working file saving subroutine
Added error status logical operator