Prevent auto changing to the directory of the file